import UIKit
import Flutter

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
      
      let controller = self.window.rootViewController as! FlutterViewController
      let channel = FlutterMethodChannel.init(name: "mine_page", binaryMessenger: controller as! FlutterBinaryMessenger)
      channel.setMethodCallHandler { (call, result) in
          if call.method == "callNativeMethond" {
//              let para = call.arguments
//              print(para!)
              
              result("我是原生返回数据")
          }else{
              result(FlutterMethodNotImplemented)
          }
          print(call.method);
      }
      
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}
